from app.common.config import Config
import unittest
from test.test_base import TestBase

class ConfigTestCase(unittest.TestCase, TestBase):
    def setUp(self):
        self.initLog('../../logger.ini')
        self.config = Config('../../config.ini')

    def testPort(self):
        assert self.config.get('mongodb', 'port') == '27017', 'incorrect mongodb port'

    def testHost(self):
        assert self.config.get('mongodb', 'host') == 'localhost', 'incorrect mongdb host'


if __name__ == '__main__':
    # portTestCase = ConfigTestCase("testPort")
    # hostTestCase = ConfigTestCase('testHost')
    unittest.main()